package com.whq.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Component
class BeanOne implements Bean{
    public void sayHi(){
        System.out.println("hi");
    }
};
@Component
class BeanTwo implements Bean{};

@Service
public class Test {

    @Resource
    private BeanOne beanOne;

    public void say(){
        System.out.println(beanOne);
        beanOne.sayHi();
    }

}
